<template>
  <div class="child-too-view">
    <p>子组件-childToo</p>
    <p>被父元素调用{{ next }}次</p>
    <van-button plain type="info" @click="getParent">调用父组件</van-button>
  </div>
</template>
<script>
export default {
  data() {
    return {
      next: 0,
    };
  },
  methods: {
    getParent() {
      this.$parent.setChildText("childToo");
    },
    getChildToo() {
      this.next += 1;
      console.log("这个是childTOO 组件事件");
    },
    getChildToo_1() {
      console.log("这个是childTOO_1 组件事件");
    },
  },
};
</script>
<style lang="scss" scoped>
.child-too-view {
  margin: 20px 10px;
  padding: 10px;
  background-color: #fff;
  border-radius: 8px;
}
</style>